//-------------缓存用户登录信息——--------------
export const getUserInfo = function (){
	return uni.getStorageSync("user_info");
}

export const saveUserInfo = function (data){
	uni.setStorage({
	    key: 'user_info',
	    data: data,
	    success: function () {
	    }
	});
}

export const removeUserInfo = function (){
	uni.removeStorage({
		key: 'user_info',
		success: function (res) {
		}
	});
}

//-------------缓存用户登录是否记住相关信息——--------------
//获取
export const getUserLoginRememberInfo = function (){
	return uni.getStorageSync("user_login_remember_info");
}

//保存
export const saveUserLoginRememberInfo = function (data){
	uni.setStorage({
	    key: 'user_login_remember_info',
	    data: data,
	    success: function () {
	    }
	});
}

//清除密码、记住标记
export const removeUserLoginRememberInfo = function (){
	let userLoginInfo = getUserLoginRememberInfo();
	userLoginInfo.password = "";
	userLoginInfo.isRecord = false;
	saveUserLoginRememberInfo(userLoginInfo);
}